<template>
  <div class="publish-con">
    <div class="top-tab">
      <a-tabs v-model:active-key="curPage" size="mini">
        <a-tab-pane v-for="item in tabList" :title="item.label" :key="item.key"></a-tab-pane>
      </a-tabs>
    </div>
    <productList v-if="!curPage" />
    <publishList v-else ref="PublishList" :status="curPage" />
  </div>
</template>

<script lang="ts" setup>
  import { ref, nextTick } from 'vue'
  import productList from './productList.vue'
  import publishList from './publishList.vue'

  const PublishList = ref()
  let curPage = ref('draft')

  let tabList = ref([
    { label: '刊登草稿箱', num: '', key: 'draft' },
    { label: '待审核', num: '', key: 'auditing' },
    { label: '已刊登', num: '', key: 'success' },
    { label: '刊登失败', num: '', key: 'fail' },
    { label: '未刊登', num: '', key: '' },
  ])
</script>

<style lang="less" scoped>
  .publish-con {
    .top-tab {
      background-color: white;
    }
  }
</style>
